import { defineStore } from 'pinia'
import { store } from '../index'


export const useAppStore = defineStore('app', {
    state: () => {
        return {
            title: import.meta.env.VITE_APP_TITLE, // 标题
        }
    },
    getters: {

        getTitle() {
            return this.title
        },
    },
    actions: {
        setTitle(title) {
            this.title = title
        },
    },
    persist: false
})

export const useAppStoreWithOut = () => {
    return useAppStore(store)
}
